﻿<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>附件上传测试</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<form id="dataForm" method="post">
		<script type="text/plain" id="myEditorFile"></script>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="20%" height="30" class="xx_bt nonebor"><span
						class="required_cls">*</span>名称:</td>
					<td width="80%" height="30" class="xx_type  nonebor"><input
						name="name" class="mini-textbox" required="true"
						style="width: 90%;" /></td>
				</tr>
				<tr>
					<td class="xx_bt"><span class="required_cls">*</span>描述:</td>
					<td class="xx_type"><input name="desc" class="mini-textbox"
						required="true" style="width: 90%;" /></td>
				</tr>
				<tr>
					<td class="xx_bt"><jsp:include page="/mgr/common/fileupload">
							<jsp:param value="<%=AttachmentFrom.RELICS_BASIC_01%>"
								name="attachmentOwner" />
							<jsp:param value="show1" name="showId" />
						</jsp:include></td>
					<td class="xx_type" id="show1"></td>
				</tr>
				<tr>
					<td class="xx_bt"><jsp:include page="/mgr/common/fileupload">
							<jsp:param value="<%=AttachmentFrom.RELICS_CULTURE_FEATURES_01%>"
								name="attachmentOwner" />
							<jsp:param value="show2" name="showId" />
						</jsp:include></td>
					<td class="xx_type" id="show2"></td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<a class="mini-button" onclick="addform.saveData"
				style="width: 60px; margin-right: 20px;">保存</a> <a
				class="mini-button" onclick="$.form.onCancel()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="${path}/js/upload.js"></script>
<script type="text/javascript">
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#dataForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			$.form.saveData({
				url : "${path}/mgr/common/addData",
				showMsg : true,//是否显示提示信息（返回参数必须是msg，json类型数据）
				id : "dataForm"
			});
		};
	});
</script>
</html>